<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>Console - Bonfire</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.5 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Console"></a>Console</h1><div class=CBody><p>Provides several additional logging features designed to work with the Forensics Profiler.</p><p>Inspired by ParticleTree&rsquo;s PHPQuickProfiler.&nbsp; (<a href="http://particletree.com" class=LURL target=_top>http://particletree.com</a>)</p><h4 class=CHeading>Package</h4><p>Forensics</p><h4 class=CHeading>Author</h4><p>Lonnie Ezell (<a href="http://lonnieezell.com" class=LURL target=_top>http://lonnieezell.com</a>)</p><h4 class=CHeading>License</h4><p>MIT</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Console" >Console</a></td><td class=SDescription>Provides several additional logging features designed to work with the Forensics Profiler.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Console.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Console.$logs" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">$logs</a></td><td class=SDescription>Contains all of the logs that are collected.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Console.$ci" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">$ci</a></td><td class=SDescription>An instance of the CI super object.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Console.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Console.__construct" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">__construct()</a></td><td class=SDescription>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Console.init" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">init()</a></td><td class=SDescription>Grabs an instance of CI and gets things ready to run.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Console.log" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">log()</a></td><td class=SDescription>Logs a variable to the console.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Console.log_memory" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">log_memory()</a></td><td class=SDescription>Logs the memory usage a single variable, or the entire script.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Console.get_logs" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">get_logs()</a></td><td class=SDescription>Returns the logs array for use in external classes. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Console.Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Console.$logs"></a>$logs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $logs</td></tr></table></blockquote><p>Contains all of the logs that are collected.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Console.$ci"></a>$ci</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $ci</td></tr></table></blockquote><p>An instance of the CI super object.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Console.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Console.__construct"></a>__construct()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public function __construct()</td></tr></table></blockquote><p>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</p><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Console.init"></a>init()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function init()</td></tr></table></blockquote><p>Grabs an instance of CI and gets things ready to run.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Console.log"></a>log()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function log(</td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Logs a variable to the console.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$data</td><td class=CDLDescription>The variable to log.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Console.log_memory"></a>log_memory()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function log_memory(</td><td class=PParameter nowrap>$object</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false,</td></tr><tr><td></td><td class=PParameter nowrap>$name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'PHP'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Logs the memory usage a single variable, or the entire script.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$object</td><td class=CDLDescription>The object to store the memory usage of.</td></tr><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The name to be displayed in the console.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Console.get_logs"></a>get_logs()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function get_logs()</td></tr></table></blockquote><p>Returns the logs array for use in external classes.&nbsp; (Namely the Forensics Profiler.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MTitle>Bonfire<div class=MSubTitle>Faster CodeIgniter Development</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Guides</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../../files2/installing-txt.html">Installing Bonfire</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/modules/overview-txt.html">Modules Overview</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/auth_notes-txt.html">Understanding Authentication</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Helpers</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../helpers/address_helper-php.html">Address Helper</a></div></div><div class=MEntry><div class=MFile><a href="../helpers/application_helper-php.html">Application Helper</a></div></div><div class=MEntry><div class=MFile><a href="../helpers/config_file_helper-php.html">Config File Helper</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Libraries</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="assets-php.html">Assets</a></div></div><div class=MEntry><div class=MFile><a href="template-php.html">Template</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/users/libraries/auth-php.html">Auth</a></div></div><div class=MEntry><div class=MFile id=MSelected>Console</div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Core Overrides</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../core/MY_Controller-php.html">Controllers</a></div></div><div class=MEntry><div class=MFile><a href="../core/MY_Model-php.html">MY_Model</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Core Modules</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../core_modules/emailer/libraries/emailer-php.html">Emailer</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/migrations/libraries/Migrations-php.html">Migrations</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/permission_model-php.html">Permission_model</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/role_model-php.html">Role_model</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../controllers/install-php.html">controllers/<wbr>install.php</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/logs/controllers/developer-php.html">core_modules/.../controllers/<wbr>developer.php</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Index</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([3, 4, 2, 5, 1], 7);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $logs</td></tr></table></blockquote>Contains all of the logs that are collected.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $ci</td></tr></table></blockquote>An instance of the CI super object.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public function __construct()</td></tr></table></blockquote>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function init()</td></tr></table></blockquote>Grabs an instance of CI and gets things ready to run.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function log(</td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Logs a variable to the console.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function log_memory(</td><td class=PParameter nowrap>$object</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false,</td></tr><tr><td></td><td class=PParameter nowrap>$name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'PHP'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Logs the memory usage a single variable, or the entire script.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function get_logs()</td></tr></table></blockquote>Returns the logs array for use in external classes. </div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>